package jmine.tec.rpc.server.representation.representers;

import jmine.tec.rpc.server.representation.RepresentationContext;

/**
 * Representer utilizado para classes que não demandam conversão.
 * 
 * @author lundberg
 * @param <R> tipo de representação
 * @param <E> tipo de entidade representada
 */
public class NoOperationRepresenter<R, E extends R> extends AbstractRepresenter<R, E> {

    /**
     * Construtor
     * 
     * @param representationClass representationClass
     * @param representedClass representedClass
     */
    public NoOperationRepresenter(Class<? extends R> representationClass, Class<? extends E> representedClass) {
        super(representationClass, representedClass);
    }

    /**
     * {@inheritDoc}
     */
    public R represent(RepresentationContext context, E object) {
        return this.getRepresentationClass().cast(object);
    }
}
